<template>
    <p>{{ title }}</p>
    <!-- 子传父，数据为参数 -->
    <p>{{ onEvent("hey") }}</p>
</template>

<script>
export default {
    data() {
        return {
        }
    },
    props: {
        title: String,
        onEvent: Function,
    },
}
</script>

<style lang="scss" scoped></style>